package com.gotop.common.config.page;


import com.github.pagehelper.Page;

/**
 * @program: cem
 * @description: 选用工具类
 * @author: superfish
 * @create: 2020-12-22 15:48
 **/
public class PageUtils {
    public static Page getPage(Query query) {
        if (null == query.getCurrent()) {
            query.setCurrent(1);
        }
        if (null == query.getSize()) {
            query.setCurrent(10);
        }
        Page page = new Page(query.getCurrent(), query.getSize());
        return page;
    }
}
